package lesson5;

import lesson3.Pedrson;

public class Demo1 {
    public static void main(String[] args) {
//        String str = "100";
//        changeValue(str);
//        System.out.println(str);
        StringBuilder stringBuilder222 = new StringBuilder();
        StringBuilder stringBuilder = new StringBuilder("100");
        System.out.println(stringBuilder);
        changeValue(stringBuilder);
        System.out.println(stringBuilder);
//        stringBuilder.append("100");
//        System.out.println(stringBuilder);
        Person person = new Person(20);
        stringBuilder.append(person);
        System.out.println(stringBuilder);
        stringBuilder.insert(5,'$');
        System.out.println(stringBuilder);
        System.out.println(stringBuilder.delete(2,6));
        stringBuilder.reverse();
        System.out.println(stringBuilder);

    }

    public static void changeValue(String value){
        value = value+"100";
    }
    public static void changeValue(StringBuilder value){
        value.append("100");
    }

}
